import java.lang.reflect.Array;
import java.util.ArrayList;

public class Example01 {
    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        list.add("张三");
        list.add("李四");
        list.add("王五");
        list.add("赵六");
        System.out.println("集合的长度："+list.size());
        System.out.println("第二个元素是："+list.get(1));
        list.remove(3);
        System.out.println("删除索引为三的元素："+list);
        list.set(1,"李四2");
        System.out.println("替换索引为1的元素为李四："+list);
    }
}
